package com.itheima.properties;

import java.util.Properties;
import java.util.Set;

/*
Properties  特有的方法
专门为 String 服务的
 */
public class Demo02 {


    public static void main(String[] args) {
        Properties prop = new Properties();

        //setProperty()  新增
        prop.setProperty("maxValue","120");
        prop.setProperty("normalValue","40");
        prop.setProperty("minValue","0");
        System.out.println(prop);
        //getProperty()查
        String minValue = prop.getProperty("minValue");
        System.out.println(minValue);
        //stringPropertyNames  查看所有的配置名
        Set<String> propertyNames = prop.stringPropertyNames();
        //System.out.println(propertyNames);
        for (String propertyName : propertyNames) {
            String propertyValue = prop.getProperty(propertyName);
            System.out.println(propertyName+"="+propertyValue);
        }


    }
}
